/*
 * @Author: your name
 * @Date: 2021-09-01 10:57:06
 * @LastEditTime: 2021-09-01 16:04:38
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \briup\5-javascript\day08\3-test.js
 */

//test() 用来检测一个字符串是否匹配某个模式 

var pattern = /abc/i;
var str = "hello 123 abc";
console.log(pattern.test(str)); //true
var str1 = "hello 123 abcde";
console.log(pattern.test(str1)); //true